<?php
class MLForum extends MModule {
    protected static $_version = '0.01';

    public static function initModel() {
        ActiveRecord\Config::initialize(function($cfg){
            $cfg->set_model_directory(__DIR__.DS.'models');
            $cfg->set_connections(Mandrill::getApp()->dbConnection);
            $cfg->set_default_connection('mandrill');
        });
    }

    public static function initJavascript() {
        MPackage::import('jquery');
        MPackage::import('jquery-colorbox');
        MPackage::import('jquery-editor');
    }

    public static $classes = array(
        'HomeController'=>'/controllers/home.php',
        'ForumsController'=>'/controllers/forums.php',
        'TopicsController'=>'/controllers/topics.php',
        'UsersController'=>'/controllers/users.php',
        'TestController'=>'/controllers/test.php',
        
        'Category'=>'/models/category.php',
        'Forum'=>'/models/forum.php',
        'Post'=>'/models/post.php',
        'Topic'=>'/models/topic.php',
        'User'=>'/models/user.php',

        'CreateTopicForm'=>'/forms/createTopicForm.php',
        'ReplyTopicForm'=>'/forms/replyTopicForm.php',
        'ModifyPostForm'=>'/forms/modifyPostForm.php',
    );


    public static $adminClasses = array(
        'AdminHomeController'=>'/admin/controllers/home.php',
    );

}
?>